package cn.gz.lbs.jobs;

import java.util.Date;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.StatefulJob;

import cn.gz.lbs.service.SPDayCountBlankService;
import cn.gz.zoomtech.common.DateUtil;


public class SPDayCountBlankJob implements StatefulJob {
	private static final Log log = LogFactory.getLog(SPDayCountBlankJob.class);

	public void execute(JobExecutionContext context)
			throws JobExecutionException {
		
		log.info("SPDayCountBlankJob start:"+DateUtil.standFormat(context.getFireTime()));
		long startTime = System.currentTimeMillis();		
		try {
			SPDayCountBlankService spDayCountBlankS = new SPDayCountBlankService();
			spDayCountBlankS.doWork();
		} catch (Exception ex) {
			log.error("SPDayCountBlankService task exception:", ex);
		} finally {
			long endTime = System.currentTimeMillis();
			long time = endTime - startTime;
			// float tt = time / 1000;
			log.info("SPDayCountBlankJob end:"+ DateUtil.standFormat(new Date()));
			log.info("SPDayCountBlankJob task cost:" + time + "ms");
			log.info("SPDayCountBlankJobNextRunTimeIs:"
					+ DateUtil.standFormat(context.getNextFireTime()));
		}
	}

}
